@font-face {
  font-family: Atkinson;
  src: url("fontes/AtkinsonHyperlegibleNext-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: Cobalto;
  src: url("fontes/Cobalto.ttf") format("truetype");
  font-display: swap;
}

:root {
  --azul: #203d69;
  --fundo: #f7f3e8;
  --papel: #fffaf0;
  --tinta: #24342f;
  --fraco: #4e5c54;
  --linha: #c4beb0;
  --barro: #a13e2b;
  --escuro: #182f50;
  color: var(--tinta);
  background: var(--fundo);
  font-family: Atkinson, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

a {
  color: var(--azul);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
input:focus-visible + label {
  outline: 3px solid var(--barro);
  outline-offset: 5px;
}

::selection {
  background: #c3d6de;
  color: #132d4c;
}

.inner {
  width: min(1170px, calc(100% - 84px));
  margin-inline: auto;
}

.jump,
.sr,
.choice {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.jump:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 9;
  clip-path: none;
  width: auto;
  height: auto;
  padding: 8px 16px;
  background: white;
}

.site-head {
  border-bottom: 1px solid var(--linha);
}

.head-row,
.foot-row,
.nav {
  display: flex;
  align-items: center;
}

.head-row {
  min-height: 77px;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 1.36rem/1 Cobalto, Georgia, serif;
  color: var(--azul);
  white-space: nowrap;
}

.brand img {
  width: 35px;
  height: 35px;
}

.nav {
  gap: clamp(12px, 2vw, 28px);
  font-size: .95rem;
}

.nav a,
.foot-links a {
  padding-block: .44rem;
  text-decoration: none;
}

.nav a:hover,
.foot-links a:hover,
.nav a[aria-current=page] {
  text-decoration: underline;
}

.nav .locale {
  border-inline-start: 1px solid var(--linha);
  padding-inline-start: 17px;
}

h1,
h2,
h3,
p,
figure,
fieldset {
  margin: 0;
}

h1,
h2,
.display {
  font-family: Cobalto, Georgia, serif;
  font-weight: 400;
  color: var(--azul);
  text-wrap: balance;
}

h3 {
  color: var(--azul);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(34px, 5.4vw, 90px);
  padding-block: clamp(44px, 5vw, 82px);
}

.hero-copy {
  padding-left: clamp(0px, 1vw, 16px);
}

.hero h1 {
  font-size: clamp(4.7rem, 8.3vw, 6rem);
  line-height: .9;
  letter-spacing: -.035em;
}

.hero h1 span {
  display: block;
}

.hero-lead {
  margin-top: 28px;
  color: var(--azul);
  font-size: clamp(1.28rem, 2.1vw, 1.68rem);
  line-height: 1.2;
  max-width: 23ch;
  text-wrap: pretty;
}

.hero-note {
  margin-top: 17px;
  max-width: 43ch;
  color: var(--fraco);
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  margin-top: 23px;
  padding: 6px 0;
  color: var(--barro);
}

.hero-link:after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid;
  border-bottom: 2px solid;
  transform: rotate(45deg);
  margin-top: -5px;
}

.viewer {
  width: 100%;
  max-width: 470px;
  justify-self: end;
  min-width: 0;
  padding: 0;
  border: 0;
  background: var(--azul);
  color: white;
  position: relative;
  box-shadow: 0 12px 30px -20px #16273f;
}

.scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 25px;
  overflow: hidden;
}

.scene:after {
  content: "";
  background: #ebe3d3 url("imagens/azulejo.png") center top/25px 25px repeat-y;
}

.scene img {
  grid-area: 1/1;
  object-fit: cover;
  object-position: center bottom;
  width: 100%;
  height: auto;
  aspect-ratio: 390/484;
}

.scene .era-b {
  display: none;
}

.viewer:has(#era-b:checked) .era-b {
  display: block;
}

.viewer:has(#era-b:checked) .era-a {
  display: none;
}

.viewer-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 15px 12px 20px;
}

.scene-name {
  font-family: Cobalto, Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.08;
}

.controls {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
}

.controls label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 2px 10px;
  cursor: pointer;
  font-size: .88rem;
  color: #f6f4ed;
  border: 1px solid transparent;
}

.controls input:checked + label {
  background: var(--papel);
  color: var(--azul);
}

.controls label:hover {
  border-color: #a3b6cd;
}

.controls input:focus-visible + label {
  outline-color: #ffdb7a;
  outline-offset: 2px;
}

.story {
  background: var(--papel);
  border-block: 1px solid var(--linha);
  padding: clamp(50px, 6vw, 88px) 0;
}

.story-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: clamp(26px, 5vw, 84px);
  margin-bottom: 30px;
}

.story h2,
.more h2 {
  font-size: clamp(2.15rem, 4.4vw, 3.9rem);
  letter-spacing: -.035em;
  line-height: 1.02;
}

.story-top p {
  max-width: 52ch;
  margin-top: .15em;
}

.spread {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2.4vw, 34px);
}

.spread figure {
  min-width: 0;
}

.spread img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center top;
}

.spread figcaption {
  padding-block: 12px 4px;
  line-height: 1.4;
  font-size: .97rem;
}

.spread strong {
  color: var(--azul);
}

.more {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 84px);
  align-items: start;
  padding-block: clamp(50px, 6vw, 85px);
}

.more p + p {
  margin-top: .7rem;
}

.site-foot {
  color: #eee9dc;
  background: var(--escuro);
}

.foot-row {
  min-height: 120px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-foot a {
  color: inherit;
}

.foot-brand {
  color: white;
  display: flex;
  gap: 10px;
  align-items: center;
  font: 1.1rem/1.2 Cobalto, Georgia, serif;
}

.foot-brand img {
  width: 28px;
  height: 28px;
}

.foot-links {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  font-size: .9rem;
}

.read {
  padding-block: clamp(40px, 7vw, 94px);
  display: grid;
  grid-template-columns: minmax(210px, .72fr) minmax(0, 1.2fr);
  gap: clamp(40px, 8vw, 100px);
  align-items: start;
}

.read h1 {
  font-size: clamp(2.65rem, 5.2vw, 4.45rem);
  letter-spacing: -.035em;
  line-height: 1.04;
  margin-top: 16px;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.read > div,
.read article {
  min-width: 0;
}

.read .back {
  font-size: .92rem;
}

.read article {
  max-width: 67ch;
  overflow-wrap: anywhere;
}

.read article > p:first-child {
  font-size: 1.18rem;
  line-height: 1.42;
  color: var(--azul);
}

.read h2 {
  margin-top: 1.45em;
  margin-bottom: .32em;
  font-size: 1.6rem;
  line-height: 1.12;
}

.read article p + p {
  margin-top: .72em;
}

.read ul {
  padding-inline-start: 1.25em;
}

.read li + li {
  margin-top: .4em;
}

.read dl {
  margin: 1.2em 0 0;
}

.read dt {
  color: var(--azul);
  font-weight: 700;
  margin-top: .8em;
}

.read dd {
  margin: 0;
}

.read .date {
  font-size: .92rem;
  color: var(--fraco);
}

@media (max-width: 780px) {
  .inner {
    width: min(100% - 40px, 650px);
  }

  .head-row {
    min-height: 64px;
    gap: 10px;
  }

  .brand {
    font-size: 1.15rem;
  }

  .brand img {
    width: 31px;
    height: 31px;
  }

  .nav {
    gap: 13px;
    font-size: .88rem;
  }

  .nav .locale {
    padding-inline-start: 11px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 27px;
    padding-block: 37px 42px;
  }

  .hero-copy {
    padding: 0;
  }

  .viewer {
    max-width: 100%;
  }

  .hero h1 {
    font-size: clamp(2.72rem, 11.7vw, 5.1rem);
    line-height: .96;
  }

  .hero h1 span {
    display: inline;
  }

  .hero-lead {
    margin-top: 13px;
    font-size: 1.32rem;
    max-width: 28ch;
  }

  .hero-note {
    margin-top: 11px;
    max-width: 48ch;
  }

  .hero-link {
    margin-top: 12px;
  }

  .scene img {
    height: auto;
  }

  .story-top,
  .more,
  .read {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .read h1 {
    margin-top: 10px;
  }

  .read {
    gap: 30px;
  }

  .foot-row {
    flex-wrap: wrap;
    gap: 14px;
    padding-block: 24px;
  }

  .spread img {
    aspect-ratio: 390/450;
  }

  .story-top {
    margin-bottom: 22px;
  }
}

@media (max-width: 520px) {
  :root {
    font-size: 17px;
  }

  .nav {
    gap: 12px;
  }

  .nav .home-nav {
    display: none;
  }

  .head-row {
    gap: 8px;
  }

  .nav .locale {
    padding-inline-start: 10px;
  }

  .inner {
    width: calc(100% - 32px);
  }

  .viewer-meta {
    padding: 9px 10px 9px 13px;
  }

  .scene {
    grid-template-columns: minmax(0, 1fr) 17px;
  }

  .scene:after {
    background-size: 17px;
  }

  .scene-name {
    font-size: .97rem;
  }

  .controls label {
    padding-inline: 8px;
  }

  .spread {
    gap: 10px;
  }

  .spread figcaption {
    font-size: .91rem;
  }

  .foot-links {
    gap: 5px 16px;
  }

  .hero-note {
    line-height: 1.4;
  }

  .read h1 {
    font-size: 2.7rem;
  }
}

@media (max-width: 340px) {
  .inner {
    width: calc(100% - 24px);
  }

  .brand {
    gap: 5px;
  }

  .nav {
    gap: 8px;
  }

  .scene-name {
    max-width: 10ch;
  }

  .viewer-meta {
    gap: 5px;
  }

  .controls label {
    padding-inline: 5px;
  }

  .foot-links {
    gap: 4px 11px;
  }

  .hero h1 {
    font-size: 2.4rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
