/* =========================================================
   S-Warrior Space - Digital Publishing Studio
   ========================================================= */

@font-face {
  font-family: 'Fraunces Display';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../fonts/fraunces-black.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces Display';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/fraunces-italic600.woff2') format('woff2');
}
@font-face {
  font-family: 'Franklin';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/franklin-var.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --paper: #E9EAEE;
  --paper-soft: #F5F5F3;
  --paper-line: #CBCDD6;
  --ink: #17161B;
  --ink-soft: #4B4A53;
  --gold: #A9791E;
  --gold-bright: #C6972E;
  --steel: #5B6270;
  --card-shadow: 0 1px 2px rgba(23, 22, 27, 0.06), 0 12px 28px -18px rgba(23, 22, 27, 0.28);

  --font-display: 'Fraunces Display', ui-serif, Georgia, serif;
  --font-body: 'Franklin', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Menlo', 'Consolas', monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E0D10;
    --paper-soft: #17161B;
    --paper-line: #2C2A31;
    --ink: #ECE9E2;
    --ink-soft: #A6A2AC;
    --gold: #D3A63E;
    --gold-bright: #E8C567;
    --steel: #8B93A1;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 40px -24px rgba(0, 0, 0, 0.7);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #0E0D10;
  --paper-soft: #17161B;
  --paper-line: #2C2A31;
  --ink: #ECE9E2;
  --ink-soft: #A6A2AC;
  --gold: #D3A63E;
  --gold-bright: #E8C567;
  --steel: #8B93A1;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 20px 40px -24px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 900; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

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

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 200;
  background: var(--gold);
  color: #17140C;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 18px;
  border-radius: 3px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: background-color 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--paper-line);
  padding: 12px 0;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { width: 36px; height: 36px; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.01em;
}
.brand-word em {
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 22px;
  border-radius: 3px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-gold {
  background: var(--gold);
  color: #17140C;
}
.btn-gold:hover { background: var(--gold-bright); transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--paper-line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-sm { padding: 8px 16px; font-size: 13px; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 168px 0 96px;
  overflow: hidden;
}
.hero-orbit {
  position: absolute;
  top: 50%;
  right: -8%;
  width: 780px;
  height: 780px;
  transform: translateY(-50%);
  opacity: 0.55;
  pointer-events: none;
}
.hero-orbit svg { width: 100%; height: 100%; }
.orbit-ring {
  fill: none;
  stroke: var(--gold);
  stroke-width: 0.6;
  opacity: 0.5;
}
.orbit-ring.ring-2 { stroke: var(--steel); opacity: 0.35; }
.orbit-spin { transform-origin: 400px 400px; animation: spin 90s linear infinite; }
.orbit-spin-rev { transform-origin: 400px 400px; animation: spin-rev 130s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }

.hero-inner {
  position: relative;
  max-width: 700px;
}
.hero h1 {
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 22px 0 24px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--gold);
}
.hero-lede {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 54ch;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.hero-microtrust {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 18px;
  letter-spacing: 0.01em;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 72px;
  padding-top: 28px;
  border-top: 1px solid var(--paper-line);
  max-width: 620px;
}
.stat-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ---------- Section shared ---------- */
section { position: relative; }
.section-pad { padding: 108px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 56px;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 42px);
  margin-top: 14px;
  max-width: 20ch;
}
.section-note {
  max-width: 34ch;
  color: var(--ink-soft);
  font-size: 15px;
  padding-bottom: 6px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Catalog ---------- */
.catalog { background: var(--paper-soft); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--gold); }

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-line);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.card:hover .card-media img { transform: scale(1.045); }

.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
}

.card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.card-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}
.card h3 {
  font-size: 21px;
  line-height: 1.2;
}
.card-desc {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  flex: 1;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-line);
}
.card-price {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  font-weight: 500;
}
.card-price .unit { color: var(--ink-soft); font-size: 11px; margin-left: 2px; }
.card-actions { display: flex; gap: 8px; }
.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--paper-line);
  border-radius: 3px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.icon-link:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Process ---------- */
.process { background: var(--paper-soft); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.process-step {
  padding-top: 24px;
  border-top: 1px solid var(--paper-line);
}
.process-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.process-step h3 {
  font-size: 24px;
  margin: 14px 0 12px;
}
.process-step p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.6;
}

/* ---------- About ---------- */
.about { background: var(--paper-soft); border-top: 1px solid var(--paper-line); border-bottom: 1px solid var(--paper-line); }
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-lede {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.45;
  color: var(--ink);
}
.about-lede em { color: var(--gold); font-style: italic; }
.about-body {
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 15px;
  max-width: 56ch;
  line-height: 1.7;
}
.about-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.about-list li {
  padding-left: 22px;
  border-left: 2px solid var(--gold);
}
.about-list h4 {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}
.about-list p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- Contact / CTA ---------- */
.contact { padding: 108px 0; }
.contact-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.contact h2 {
  font-size: clamp(28px, 4vw, 40px);
  max-width: 14ch;
}
.contact-emails {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
}
.contact-emails a { color: var(--gold); }
.contact-emails a:hover { color: var(--gold-bright); }
.contact-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--paper-line);
  padding: 40px 0;
  background: var(--paper-soft);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-soft);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.footer-brand img { width: 20px; height: 20px; opacity: 0.85; }
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--gold); }

/* ---------- Trust strip ---------- */
.trust-strip {
  border-bottom: 1px solid var(--paper-line);
  background: var(--paper-soft);
}
.trust-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  padding: 20px 28px;
  justify-content: center;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.trust-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  background: var(--paper);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.filter-btn:hover { border-color: var(--gold); color: var(--ink); }
.filter-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .filter-btn.is-active { background: var(--gold); border-color: var(--gold); color: #17140C; }
}
:root[data-theme="dark"] .filter-btn.is-active { background: var(--gold); border-color: var(--gold); color: #17140C; }
.filter-btn .count {
  font-variant-numeric: tabular-nums;
  opacity: 0.65;
}
.card.is-hidden { display: none; }
.filter-empty {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14px;
  padding: 40px 0;
}

/* ---------- Card chips / badges / includes ---------- */
.card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid var(--paper-line);
  border-radius: 2px;
  color: var(--ink-soft);
}
.chip-cat { color: var(--ink-soft); }
.chip-license.chip--plr { border-color: var(--gold); color: var(--gold); }
.chip-license.chip--commercial { border-color: var(--steel); color: var(--steel); }
.chip-license.chip--personal { border-color: var(--paper-line); color: var(--ink-soft); }
.chip-license.chip--saas { border-color: var(--gold-bright); color: var(--gold-bright); }

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--gold);
  color: #17140C;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 2px;
}

.card-includes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 2px 0 0;
}
.card-includes li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.card-includes li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 12px;
}

.price-was {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  text-decoration: line-through;
  text-decoration-color: var(--steel);
  margin-right: 6px;
}
.price-unlisted {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}

/* ---------- Licensing section ---------- */
.license-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.license-card {
  border: 1px solid var(--paper-line);
  border-radius: 4px;
  padding: 24px;
  background: var(--paper-soft);
}
.license-card .chip { margin-bottom: 16px; }
.license-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.license-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 14px;
}
.license-applies {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  padding-top: 14px;
  border-top: 1px solid var(--paper-line);
}
.license-applies b { color: var(--ink); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 840px;
}
.faq-item {
  border-bottom: 1px solid var(--paper-line);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 22px;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  padding: 0 0 24px;
  max-width: 68ch;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
}
.faq-item p a { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .process-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-orbit { width: 560px; height: 560px; right: -18%; }
  .license-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--paper-line);
    padding: 8px 28px 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.25s ease;
  }
  .nav-links a { padding: 10px 0; width: 100%; }
  .site-header.is-open .nav-links { max-height: 320px; opacity: 1; }
  .nav-toggle { display: inline-flex; }
  .site-header.is-open .nav-toggle span { transform: rotate(45deg); }
  .site-header.is-open .nav-toggle span::before { top: 0; transform: rotate(0deg); opacity: 0; }
  .site-header.is-open .nav-toggle span::after { top: 0; transform: rotate(90deg); }
  .header-actions .btn-ghost { display: none; }
  .catalog-grid { grid-template-columns: 1fr; }
  .hero { padding: 132px 0 72px; }
  .hero-stats { gap: 28px; flex-wrap: wrap; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .contact-inner { flex-direction: column; align-items: flex-start; }
  .hero-orbit { opacity: 0.35; width: 420px; height: 420px; right: -30%; }
  .license-grid { grid-template-columns: 1fr; }
  .trust-strip .wrap { justify-content: flex-start; padding: 16px 20px; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 20px; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 14px; }
  .filter-bar { gap: 8px; }
  .filter-btn { padding: 8px 13px; font-size: 12px; }
}
