/*
Theme Name: Revista A-Temporal
Theme URI: https://atemporalrevista.wordpress.com
Author: Grupo A
Author URI: https://atemporalrevista.wordpress.com
Description: Tema personalizado para a Revista A-temporal baseado na estética de revista impressa.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: revista-atemporal
*/

:root {
  --red: #e60000;
  --ink: #111;
  --muted: #555;
  --paper: #fff;
  --rule: #111;
}

body {
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
}

.atemp, .atemp * { box-sizing: border-box; }

.atemp {
  max-width: 1000px;
  margin: 20px auto;
  padding: 0 clamp(14px, 4vw, 32px) 40px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.atemp a { color: inherit; }
.atemp img { max-width: 100%; height: auto; display: block; }

/* Faixa superior */
.atemp-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 8px 16px;
  padding: 18px 0 6px;
  border-bottom: 1.5px solid var(--rule);
  font-size: clamp(.72rem, 1.6vw, .95rem);
}
.atemp-top .l { display: flex; gap: clamp(12px, 5vw, 56px); }
.atemp-top .c {
  font-family: "Arial Narrow", Oswald, "Helvetica Neue", Arial, sans-serif;
  font-stretch: condensed;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  line-height: 1;
  letter-spacing: -.03em;
  transform: scaleX(.8);
}
.atemp-top .r { text-align: right; }

/* Título */
.atemp-title {
  margin: 0;
  padding: clamp(6px, 1.5vw, 14px) 0;
  text-align: center;
  border-bottom: 1.5px solid var(--rule);
  font-family: "Times New Roman", Times, "Liberation Serif", serif;
  font-weight: 400;
  font-size: clamp(2.1rem, 8.5vw, 4.2rem);
  line-height: 1.1;
  letter-spacing: -.045em;
}
.atemp-title .box {
  background: var(--red);
  color: #fff;
  padding: 0 .12em .04em;
  margin-right: .05em;
}

/* Seções */
.atemp-h {
  margin: clamp(22px, 4vw, 40px) 0 14px;
  padding: 4px 0;
  border-top: 1.5px solid var(--rule);
  border-bottom: 1.5px solid var(--rule);
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  padding-left: 14px;
}

.atemp p { margin: 0 0 .9em; text-align: justify; hyphens: auto; }
.atemp p.first { text-indent: 2.2em; }

/* Abertura */
.atemp-open {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}
.atemp-open figure { margin: 0; }
.atemp-open figcaption {
  margin-top: 8px;
  font-size: .9rem;
  color: var(--muted);
  text-align: justify;
  text-indent: 2em;
}
.atemp-open img { border: 1.5px solid var(--rule); width: 100%; }

.atemp-lede { font-size: clamp(1.05rem, 2vw, 1.25rem); }
.atemp-lede strong { color: var(--red); }

/* Edições */
.atemp-eds {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2.5vw, 24px);
}
.atemp-ed {
  border: 1.5px solid var(--rule);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.atemp-ed:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--red); }
.atemp-ed .n {
  font-family: "Arial Narrow", Oswald, Arial, sans-serif;
  font-stretch: condensed;
  font-size: 3rem;
  line-height: 1;
  letter-spacing: -.04em;
  transform-origin: left;
  transform: scaleX(.8);
}
.atemp-ed .d { font-size: .85rem; color: var(--muted); margin: 0; text-align: left; }
.atemp-ed p { font-size: .92rem; margin: 0; text-align: left; }
.atemp-ed .go {
  margin-top: auto;
  padding-top: 8px;
  font-weight: 700;
  color: var(--red);
  text-decoration: none;
  border-bottom: 2px solid var(--red);
  align-self: flex-start;
}
.atemp-ed .doi { font-size: .75rem; color: var(--muted); word-break: break-all; }

/* Expediente */
.atemp-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px clamp(16px, 4vw, 40px);
}
.atemp-info p { text-align: left; margin: 0 0 .7em; }
.atemp-info b { display: block; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--red); }

/* Botões */
.atemp-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.atemp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 22px;
  border: 1.5px solid var(--rule);
  background: #fff;
  color: var(--ink) !important;
  font-weight: 700;
  text-decoration: none !important;
  text-align: center;
  transition: background .15s, color .15s;
}
.atemp-btn:hover, .atemp-btn:focus-visible { background: var(--ink); color: #fff !important; }
.atemp-btn.red { background: var(--red); border-color: var(--red); color: #fff !important; }
.atemp-btn.red:hover, .atemp-btn.red:focus-visible { background: #a80000; border-color: #a80000; }

.atemp-foot {
  margin-top: 34px;
  padding-top: 10px;
  border-top: 1.5px solid var(--rule);
  font-size: .8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

/* Responsividade */
@media (max-width: 900px) {
  .atemp-eds { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .atemp-top { grid-template-columns: 1fr auto; }
  .atemp-top .l { grid-column: 1 / -1; order: 2; justify-content: space-between; }
  .atemp-top .r { display: none; }
  .atemp-open { grid-template-columns: 1fr; }
  .atemp-eds { grid-template-columns: 1fr; }
  .atemp-info { grid-template-columns: 1fr; }
  .atemp-btns { flex-direction: column; }
  .atemp-btn { width: 100%; }
  .atemp p { text-align: left; hyphens: none; }
}

@media (prefers-reduced-motion: reduce) {
  .atemp-ed, .atemp-btn { transition: none; }
  .atemp-ed:hover { transform: none; }
}
