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

:root {
  --ink:       #0d0c0a;
  --parchment: #c8b99a;
  --rust:      #8b3a2a;
  --gold:      #b8922a;
  --aged:      #e8dcc8;
  --shadow:    #1a1510;
  --muted:     #6b5d4f;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--ink);
  color: var(--aged);
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 18px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === MAP TEXTURE BACKGROUND === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(139, 58, 42, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(184, 146, 42, 0.06) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 30 L30 0 L60 30 L30 60 Z' fill='none' stroke='%23b8922a' stroke-width='0.3' stroke-opacity='0.12'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

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

main { position: relative; z-index: 1; }

/* === HEADER === */
header {
  text-align: center;
  padding: 3.5rem 1.5rem 2rem;
  border-bottom: 1px solid rgba(184, 146, 42, 0.2);
  position: relative;
}

.logo-rule {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1rem;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.logo-rule::before,
.logo-rule::after {
  content: '';
  height: 1px;
  width: 3rem;
  background: linear-gradient(90deg, transparent, var(--gold));
}
.logo-rule::after {
  background: linear-gradient(90deg, var(--gold), transparent);
}

.logo-emblem {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--gold);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-emblem span {
  transform: rotate(-45deg);
  font-family: 'Cinzel', serif;
  font-size: 14px;
  color: var(--gold);
  font-weight: 900;
}

h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--aged);
  line-height: 1.1;
  opacity: 0;
  animation: fadeUp 0.8s 0.15s ease forwards;
}

h1 .accent { color: var(--gold); }

.tagline {
  margin-top: 0.8rem;
  font-size: clamp(0.95rem, 3.5vw, 1.15rem);
  font-style: italic;
  color: var(--parchment);
  font-weight: 300;
  opacity: 0;
  animation: fadeUp 0.8s 0.3s ease forwards;
}

/* === INTRO SECTION === */
.intro {
  max-width: 640px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.8s 0.45s ease forwards;
}

.intro p {
  color: var(--aged);
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
}

.intro strong { color: var(--parchment); font-weight: 400; }

/* === DIVIDER === */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.5rem;
  margin: 0.5rem 0;
  opacity: 0;
  animation: fadeUp 0.8s 0.55s ease forwards;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,146,42,0.3), transparent);
}
.divider-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  white-space: nowrap;
}

/* === TOOLS GRID === */
.tools {
  padding: 1rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 680px;
  margin: 0 auto;
}

.tool-card {
  border: 1px solid rgba(184, 146, 42, 0.25);
  background: linear-gradient(135deg, rgba(26,21,16,0.9), rgba(13,12,10,0.95));
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transition: border-color 0.3s, transform 0.2s;
}

.tool-card:nth-child(1) { animation: fadeUp 0.7s 0.6s ease forwards; }
.tool-card:nth-child(2) { animation: fadeUp 0.7s 0.75s ease forwards; }

.tool-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 3px;
  height: 100%;
  background: var(--rust);
  transition: width 0.3s;
}

.tool-card:hover {
  border-color: rgba(184, 146, 42, 0.5);
  transform: translateY(-2px);
}
.tool-card:hover::before { width: 5px; background: var(--gold); }

.tool-publisher {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.tool-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.2rem, 5vw, 1.6rem);
  font-weight: 600;
  color: var(--aged);
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.tool-desc {
  font-size: 0.95rem;
  color: var(--parchment);
  font-weight: 300;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.feature-tag {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(184,146,42,0.35);
  padding: 0.2rem 0.5rem;
}

.tool-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}
.tool-cta::after {
  content: '→';
  transition: transform 0.2s;
}
.tool-card:hover .tool-cta::after { transform: translateX(4px); }

/* === PHILOSOPHY SECTION === */
.philosophy {
  margin: 0 1.25rem 3rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.75rem 1.5rem;
  border: 1px solid rgba(184, 146, 42, 0.15);
  border-left: 3px solid var(--rust);
  opacity: 0;
  animation: fadeUp 0.8s 0.9s ease forwards;
}

.philosophy h2 {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.philosophy p {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--parchment);
  font-weight: 300;
  line-height: 1.75;
}

/* === FOOTER === */
footer {
  border-top: 1px solid rgba(184,146,42,0.15);
  padding: 2rem 1.5rem;
  text-align: center;
  opacity: 0;
  animation: fadeUp 0.8s 1s ease forwards;
}

footer p {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

footer a { color: var(--gold); text-decoration: none; }

/* === ANIMATIONS === */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* === MOBILE REFINEMENTS === */
@media (max-width: 380px) {
  h1 { font-size: 1.7rem; }
  .tool-card { padding: 1.25rem 1.1rem; }
}
