/* ============================================================
   THE FRAME — style.css
   Design: manifesto/dokument-operacyjny. Motyw przewodni: RAMA —
   narożniki-nawiasy (jak celownik/kadr aparatu) oznaczają że coś
   jest "w kadrze" — dosłowne odniesienie do tytułu książki.
   ============================================================ */

:root {
  --bg: #0b0b0c;
  --bg-alt: #141416;
  --bg-card: #1a1a1c;
  --text: #ede9e2;
  --text-dim: #9a968d;
  --text-faint: #5c5952;
  --accent: #c81e2c;
  --accent-bright: #e6394a;
  --accent-dim: #3a1216;
  --amber: #d98f2b;
  --border: #2a2a2c;

  --font-display: 'Anton', 'Arial Narrow', sans-serif;
  --font-body: 'Source Serif 4', Georgia, serif;
  --font-mono: 'Space Mono', monospace;

  --container: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

.tf-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Frame corner signature (viewfinder brackets) --- */
.tf-frame-corner {
  position: fixed;
  width: 34px;
  height: 34px;
  border-color: var(--accent);
  border-style: solid;
  z-index: 40;
  pointer-events: none;
  opacity: 0.85;
}
.tf-frame-corner--tl { top: 14px; left: 14px; border-width: 3px 0 0 3px; }
.tf-frame-corner--br { bottom: 14px; right: 14px; border-width: 0 3px 3px 0; }
@media (max-width: 640px) {
  .tf-frame-corner { width: 20px; height: 20px; }
}

.tf-frame-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: inline-block;
}

/* --- Nav --- */
.tf-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 11, 12, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.tf-nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tf-nav__logo {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
}
.tf-nav__links {
  display: flex;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tf-nav__links a { text-decoration: none; color: var(--text-dim); }
.tf-nav__links a:hover { color: var(--text); }
@media (max-width: 700px) {
  .tf-nav__links { display: none; }
}

/* --- Buttons --- */
.tf-btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 2px;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.tf-btn:hover { transform: translateY(-1px); }
.tf-btn--accent { background: var(--accent); color: #fff; }
.tf-btn--accent:hover { background: var(--accent-bright); }
.tf-btn--outline { border-color: var(--text-dim); color: var(--text); background: transparent; }
.tf-btn--outline:hover { border-color: var(--text); }
.tf-btn--sm { padding: 9px 16px; font-size: 12px; }
.tf-btn--ghost { background: transparent; color: var(--amber); border-color: var(--amber); }
.tf-btn--ghost:hover { background: var(--amber); color: #1a1200; }
.tf-btn--block { display: block; width: 100%; text-align: center; }

/* --- Hero --- */
.tf-hero {
  padding: 72px 0 56px;
  border-bottom: 1px solid var(--border);
}
.tf-hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .tf-hero__grid { grid-template-columns: 1fr; }
  .tf-hero__image { order: -1; }
}
.tf-hero__eyebrow {
  font-family: var(--font-mono);
  color: var(--accent-bright);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.tf-hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0 0 20px;
  text-transform: uppercase;
}
.tf-hero h1 em {
  font-style: normal;
  color: var(--accent-bright);
}
.tf-hero__sub {
  font-size: 20px;
  color: var(--text-dim);
  max-width: 46ch;
  margin: 0 0 30px;
}
.tf-hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tf-hero__note {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}
.tf-hero__image {
  position: relative;
  border: 1px solid var(--border);
}
.tf-hero__image::before,
.tf-hero__image::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: var(--accent);
  border-style: solid;
}
.tf-hero__image::before { top: -1px; left: -1px; border-width: 3px 0 0 3px; }
.tf-hero__image::after { bottom: -1px; right: -1px; border-width: 0 3px 3px 0; }
.tf-hero__image img { width: 100%; }

/* --- Sections --- */
.tf-section { padding: 64px 0; border-bottom: 1px solid var(--border); }
.tf-section--alt { background: var(--bg-alt); }
.tf-section h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 38px);
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 0 20px;
}
.tf-section__lede {
  font-size: 19px;
  color: var(--text-dim);
  max-width: 62ch;
  margin: 0 0 36px;
}
.tf-section--tight { padding-top: 48px; padding-bottom: 48px; }

/* --- Full-bleed manifesto image break --- */
.tf-break {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
}
.tf-break::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,12,0.55) 0%, rgba(11,11,12,0.85) 100%);
}
.tf-break__inner {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 24px;
  text-align: center;
}
.tf-break__inner p {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 32px);
  text-transform: uppercase;
  line-height: 1.2;
  margin: 0;
}
.tf-break__inner p em {
  font-style: normal;
  color: var(--accent-bright);
}

/* --- Pillars / concept grid --- */
.tf-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
@media (max-width: 760px) {
  .tf-grid-3 { grid-template-columns: 1fr; }
}
.tf-pillar {
  background: var(--bg);
  padding: 32px 28px;
}
.tf-pillar__num {
  font-family: var(--font-mono);
  color: var(--accent-bright);
  font-size: 13px;
  margin-bottom: 14px;
  display: block;
}
.tf-pillar h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 22px;
  margin: 0 0 12px;
}
.tf-pillar p { color: var(--text-dim); margin: 0; font-size: 16px; }

/* --- Table of contents (chapters) --- */
.tf-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}
.tf-toc li {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.tf-toc__num {
  font-family: var(--font-mono);
  color: var(--accent-bright);
  min-width: 2.4ch;
  flex-shrink: 0;
}
.tf-toc__title { font-weight: 600; }
.tf-toc__desc { color: var(--text-dim); font-size: 16px; }

/* --- Products --- */
.tf-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) {
  .tf-products { grid-template-columns: 1fr; }
}
.tf-product {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 30px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.tf-product--featured { border-color: var(--accent); }
.tf-product__badge {
  position: absolute;
  top: -12px;
  left: 26px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
}
.tf-product__badge--amber { background: var(--amber); color: #1a1200; }
.tf-product h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 22px;
  margin: 10px 0 6px;
}
.tf-product__price {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--text);
  margin-bottom: 14px;
}
.tf-product__price span {
  font-size: 14px;
  color: var(--text-faint);
  font-family: var(--font-body);
}
.tf-product p.tf-product__desc {
  color: var(--text-dim);
  font-size: 15px;
  flex-grow: 1;
  margin-bottom: 22px;
}

/* --- Reviews --- */
.tf-reviews {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
@media (max-width: 760px) {
  .tf-reviews { grid-template-columns: 1fr; }
}
.tf-review {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 26px;
}
.tf-review__stars { color: var(--amber); font-family: var(--font-mono); margin-bottom: 10px; letter-spacing: 2px; }
.tf-review h4 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 18px;
  margin: 0 0 10px;
}
.tf-review p { color: var(--text-dim); font-size: 16px; margin: 0 0 14px; }
.tf-review__author {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  text-transform: uppercase;
}

/* --- Newsletter box --- */
.tf-lead {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 36px;
}
.tf-lead h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 24px;
  margin: 0 0 12px;
}
.tf-lead p { color: var(--text-dim); margin-bottom: 20px; }
.tf-lead__embed {
  border: 1px dashed var(--text-faint);
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}

/* --- Forms (reviews, admin) --- */
.tf-form { display: grid; gap: 16px; max-width: 620px; }
.tf-form label {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  display: block;
  margin-bottom: 6px;
}
.tf-form input[type="text"],
.tf-form input[type="email"],
.tf-form input[type="password"],
.tf-form textarea,
.tf-form select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 16px;
  border-radius: 2px;
}
.tf-form input:focus, .tf-form textarea:focus, .tf-form select:focus {
  border-color: var(--accent);
  outline: none;
}
.tf-form textarea { min-height: 140px; resize: vertical; }
.tf-form__checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-dim); }
.tf-form__checkbox input { margin-top: 4px; }
.tf-form__stars { display: flex; gap: 8px; font-family: var(--font-mono); }
.tf-notice {
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  background: var(--bg-card);
  padding: 16px 20px;
  font-size: 15px;
  margin-bottom: 24px;
}
.tf-notice--success { border-left-color: #3f9d5c; }
.tf-notice--error { border-left-color: var(--accent); }

/* --- Article cards --- */
.tf-article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 860px) {
  .tf-article-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .tf-article-grid { grid-template-columns: 1fr; }
}
.tf-article-card {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
}
.tf-article-card__img {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--bg-alt);
}
.tf-article-card__img img { width: 100%; height: 100%; object-fit: cover; }
.tf-article-card__body { padding: 18px 20px 22px; flex-grow: 1; display: flex; flex-direction: column; }
.tf-article-card__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.tf-article-card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 19px;
  line-height: 1.25;
  margin: 0 0 10px;
}
.tf-article-card p { color: var(--text-dim); font-size: 15px; margin: 0; flex-grow: 1; }

/* --- Single article --- */
.tf-article {
  max-width: 720px;
  margin: 0 auto;
}
.tf-article__meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-bright);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.tf-article h1 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  margin: 0 0 24px;
}
.tf-article__cover { margin-bottom: 32px; border: 1px solid var(--border); }
.tf-article__body { font-size: 19px; line-height: 1.75; }
.tf-article__body h2 { font-family: var(--font-display); text-transform: uppercase; font-weight: 400; margin-top: 2em; }
.tf-article__body p { margin: 0 0 1.3em; }
.tf-article__body img { margin: 2em 0; border: 1px solid var(--border); }
.tf-article__body blockquote {
  border-left: 3px solid var(--accent);
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  color: var(--text-dim);
  font-style: italic;
}

/* --- Empty state --- */
.tf-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* --- Footer --- */
.tf-footer { background: var(--bg-alt); }
.tf-footer__cta {
  text-align: center;
  padding: 72px 24px 56px;
  border-bottom: 1px solid var(--border);
}
.tf-footer__cta h2 {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(26px, 4vw, 40px);
  margin: 0 0 30px;
}
.tf-footer__buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.tf-footer__bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
}
.tf-footer__social { display: flex; gap: 20px; }
.tf-footer__social a, .tf-footer__legal a { color: var(--text-dim); text-decoration: none; }
.tf-footer__social a:hover, .tf-footer__legal a:hover { color: var(--text); }
.tf-footer__legal { display: flex; gap: 16px; flex-wrap: wrap; }

/* --- Admin --- */
.tf-admin-bar {
  background: var(--accent-dim);
  border-bottom: 1px solid var(--accent);
  padding: 10px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tf-admin-bar a { color: var(--text); text-decoration: underline; }
.tf-admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.tf-admin-table th, .tf-admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  vertical-align: top;
}
.tf-admin-table th { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; color: var(--text-dim); }
