/*
Theme Name: ParaTemplarios
Theme URI: https://paratemplarios.com
Author: ParaTemplarios
Description: Tema editorial contemporáneo para ParaTemplarios.
Version: 1.0.0
Text Domain: paratemplarios
*/

:root {
  --ink: #171614;
  --ink-soft: #3f3b36;
  --ivory: #f3efe6;
  --paper: #fbf9f4;
  --red: #900d12;
  --red-dark: #61080b;
  --gold: #b88a45;
  --line: rgba(23, 22, 20, .16);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 5%, rgba(184,138,69,.09), transparent 24rem),
    linear-gradient(rgba(255,255,255,.65), rgba(255,255,255,.65)),
    repeating-linear-gradient(90deg, transparent 0 7px, rgba(23,22,20,.018) 7px 8px),
    var(--ivory);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}
a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 200; padding: 10px 16px; background: #fff; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: rgba(17,16,15,.96);
  border-bottom: 1px solid rgba(184,138,69,.45);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; text-decoration: none; }
.brand img { width: 255px; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; list-style: none; }
.primary-nav a {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-decoration: none;
  text-transform: uppercase;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a { color: #ddb471; }
.primary-nav .menu-item-has-children { position: relative; }
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 24px);
  left: -20px;
  display: grid;
  width: 310px;
  max-height: min(70vh, 620px);
  padding: 14px 20px;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  background: #151311;
  border: 1px solid rgba(184,138,69,.35);
  transform: translateY(8px);
  transition: .2s ease;
}
.primary-nav .menu-item-has-children:hover > .sub-menu,
.primary-nav .menu-item-has-children:focus-within > .sub-menu {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.primary-nav .sub-menu a { padding: 8px 0; color: rgba(255,255,255,.75); font-size: 11px; }
.nav-cta { padding: 10px 17px; border: 1px solid var(--gold); }
.menu-toggle { display: none; margin-left: auto; padding: 12px; color: #fff; background: none; border: 0; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  display: grid;
  align-items: center;
  color: #fff;
  background: #151311 url("assets/images/hero-templar.jpg") center center / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10,9,8,.98) 0%, rgba(10,9,8,.82) 39%, rgba(10,9,8,.26) 70%, rgba(10,9,8,.12) 100%),
    linear-gradient(0deg, rgba(10,9,8,.58), transparent 45%);
}
.hero::after {
  content: "✠";
  position: absolute;
  right: -3vw;
  top: 48%;
  color: rgba(255,255,255,.045);
  font-family: var(--serif);
  font-size: min(60vw, 720px);
  line-height: 0;
  transform: translateY(-50%);
}
.hero-inner { position: relative; z-index: 2; padding-block: 110px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 44px; height: 1px; background: currentColor; }
h1, h2, h3 { margin: 0 0 .45em; font-family: var(--serif); font-weight: 600; line-height: .98; text-wrap: balance; }
.hero h1 { max-width: 760px; font-size: clamp(52px, 7.5vw, 104px); letter-spacing: -.035em; }
.hero h1 em { color: #d6ad69; font-weight: 400; }
.hero-copy { max-width: 620px; margin: 26px 0 34px; color: rgba(255,255,255,.72); font-size: 18px; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 24px;
  color: #fff;
  background: var(--red);
  border: 1px solid var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .14em;
  text-decoration: none;
  text-transform: uppercase;
  transition: .25s ease;
}
.button::after { content: "→"; font-size: 18px; font-weight: 400; }
.button:hover { color: var(--ink); background: #fff; border-color: #fff; transform: translateY(-2px); }
.button.ghost { margin-left: 10px; background: transparent; border-color: rgba(255,255,255,.35); }
.hero-note { position: absolute; right: 0; bottom: 48px; writing-mode: vertical-rl; color: rgba(255,255,255,.42); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }

.trust-strip { color: #fff; background: var(--red-dark); border-block: 1px solid #ad3236; }
.trust-list { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 18px 0; list-style: none; }
.trust-list li { text-align: center; font-family: var(--serif); font-size: 18px; border-right: 1px solid rgba(255,255,255,.2); }
.trust-list li:last-child { border: 0; }
.trust-list span { margin-right: 9px; color: #ddb471; }

.section { padding: 110px 0; }
.section-dark { color: #fff; background: var(--ink); }
.section-heading { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 50px; margin-bottom: 55px; }
.section-heading h2 { font-size: clamp(44px, 6vw, 76px); }
.section-heading p { max-width: 510px; margin: 0 0 8px; color: #6d665d; }
.section-dark .section-heading p { color: rgba(255,255,255,.58); }

.category-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.category-card {
  position: relative;
  grid-column: span 4;
  min-height: 390px;
  overflow: hidden;
  color: #fff;
  background: #25211d;
  text-decoration: none;
}
.category-card:first-child, .category-card:nth-child(5) { grid-column: span 8; }
.category-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) contrast(1.08); transition: transform .65s ease, filter .4s ease; }
.category-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(10,9,8,.92)); }
.category-card:hover img { filter: saturate(.9); transform: scale(1.045); }
.category-content { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 25px; }
.category-number { color: #d8ad68; font-size: 10px; letter-spacing: .2em; }
.category-card h3 { margin: 4px 0; font-size: 34px; }
.category-card small { color: rgba(255,255,255,.62); text-transform: uppercase; letter-spacing: .13em; }

.manifesto { display: grid; grid-template-columns: .75fr 1.25fr; gap: 8vw; align-items: start; }
.manifesto-mark { position: sticky; top: 130px; color: var(--red); font-family: var(--serif); font-size: 200px; line-height: .7; text-align: center; }
.manifesto h2 { font-size: clamp(48px, 6vw, 82px); }
.manifesto-copy > p:first-of-type { font-family: var(--serif); font-size: 28px; line-height: 1.35; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 45px; }
.principle { padding-top: 20px; border-top: 1px solid var(--line); }
.principle strong { display: block; margin-bottom: 8px; color: var(--red); font-family: var(--serif); font-size: 24px; }

.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.journal-card { color: inherit; text-decoration: none; }
.journal-image { aspect-ratio: 4/3; overflow: hidden; margin-bottom: 20px; background: #302b26; }
.journal-image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.45); transition: .4s; }
.journal-card:hover img { filter: grayscale(0); transform: scale(1.03); }
.journal-card time { color: var(--gold); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.journal-card h3 { margin-top: 10px; font-size: 31px; line-height: 1.05; }

.content-shell { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 70px; padding-block: 90px; }
.content-shell.no-sidebar { grid-template-columns: minmax(0, 850px); justify-content: center; }
.entry-header { padding: 80px 0 55px; color: #fff; background: var(--ink); }
.entry-header h1 { max-width: 920px; font-size: clamp(48px, 7vw, 86px); }
.entry-body { font-family: var(--sans); }
.entry-body > p:first-child { font-size: 20px; }
.entry-body h2 { margin-top: 1.2em; font-size: 43px; }
.entry-body h3 { margin-top: 1.2em; font-size: 32px; }
.entry-body img { border: 1px solid rgba(184,138,69,.35); }
.entry-body ul, .entry-body ol { padding-left: 1.3em; }
.entry-body .wp-block-button__link, .entry-body input[type=submit] { border-radius: 0; background: var(--red); }
.entry-body table { width: 100%; border-collapse: collapse; }
.entry-body td, .entry-body th { padding: 12px; border: 1px solid var(--line); }
.sidebar { padding-left: 28px; border-left: 1px solid var(--line); }
.sidebar h2 { font-size: 25px; }

.site-footer { padding: 75px 0 28px; color: rgba(255,255,255,.65); background: #11100f; border-top: 3px solid var(--red); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 70px; }
.footer-brand img { width: 330px; margin-bottom: 22px; }
.footer-title { color: #d6ad69; font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.footer-menu { margin: 16px 0 0; padding: 0; list-style: none; }
.footer-menu a { color: rgba(255,255,255,.65); text-decoration: none; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 60px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }

@keyframes reveal { from { opacity: 0; transform: translateY(18px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

@media (max-width: 900px) {
  .header-inner { min-height: 68px; }
  .brand img { width: 205px; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 68px; left: 0; right: 0; padding: 24px; background: #11100f; border-bottom: 1px solid var(--gold); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { display: block; padding: 12px 0; }
  .primary-nav .sub-menu { display: none; position: static; width: auto; max-height: none; padding: 0 0 0 18px; visibility: visible; opacity: 1; border: 0; transform: none; }
  .primary-nav .menu-item-has-children:hover > .sub-menu,
  .primary-nav .menu-item-has-children:focus-within > .sub-menu { display: block; }
  .hero { min-height: 650px; }
  .section-heading, .manifesto, .content-shell, .footer-grid { grid-template-columns: 1fr; }
  .manifesto-mark { display: none; }
  .category-card, .category-card:first-child, .category-card:nth-child(5) { grid-column: span 6; }
  .content-shell { gap: 35px; }
  .sidebar { padding: 28px 0 0; border: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 28px), var(--max)); }
  .hero-inner { padding-block: 80px; }
  .hero { background-position: 66% center; }
  .hero h1 { font-size: 49px; }
  .hero-copy { font-size: 16px; }
  .button { width: 100%; justify-content: center; }
  .button.ghost { margin: 10px 0 0; }
  .hero-note { display: none; }
  .trust-list { grid-template-columns: 1fr; gap: 8px; }
  .trust-list li { border: 0; font-size: 16px; }
  .section { padding: 75px 0; }
  .section-heading { gap: 14px; margin-bottom: 35px; }
  .category-grid, .journal-grid, .principles { grid-template-columns: 1fr; }
  .category-card, .category-card:first-child, .category-card:nth-child(5) { grid-column: auto; min-height: 340px; }
  .footer-grid { gap: 38px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
}
