:root {
  color-scheme: dark;
  --ink: #0b121a;
  --panel: #121f2a;
  --paper: #f4e6ce;
  --muted: #b5c6d1;
  --line: #5e5347;
  --gold: #e6bc83;
  --ice: #a7e1ec;
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  line-height: 1.5;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--ink); color: var(--paper); }
[hidden] { display: none !important; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 4px;
}

.layout { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #111c26; }
.header-content, nav { display: flex; align-items: center; gap: 1.5rem; }
.header-content { justify-content: space-between; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand img { border: 1px solid var(--line); border-radius: 50%; }
.brand span, h1, h2 { font-family: "Baskervville", Georgia, serif; font-weight: 400; }
.brand span { font-size: clamp(1rem, 3vw, 1.3rem); }
nav a { color: var(--muted); text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--gold); }

main { padding-block: 2rem 3rem; }
.hero {
  min-height: clamp(23rem, 44vw, 34rem);
  display: flex;
  align-items: end;
  padding: clamp(1.3rem, 5.3vw, 4rem);
  background: linear-gradient(90deg, #0a1725e8 0%, #0a17256b 53%, #08111b20 76%),
              linear-gradient(0deg, #08111be5, transparent 56%),
              #142537 url("assets/ponte-de-inverno.webp") center 53% / cover no-repeat;
  border: 1px solid var(--line);
  border-radius: .65rem;
}
.hero small { color: var(--gold); font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; }
h1 { font-size: clamp(3.4rem, 8vw, 6.75rem); line-height: .89; letter-spacing: -.05em; margin: .7rem 0 1.2rem; }
.hero p { color: #e1eaf0; max-width: 32ch; margin: 0; font-size: clamp(1rem, 2vw, 1.2rem); }
.access { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: .65rem; padding: clamp(1.1rem, 3vw, 2rem); }
.panel h2 { margin: 0; font-size: 1.92rem; line-height: 1.16; }
.panel > p { color: var(--muted); margin: .55rem 0 1.4rem; }
form { display: grid; }
label { font-weight: 600; }
input { margin: .25rem 0; min-width: 0; min-height: 2.75rem; padding: .5rem .65rem; font: inherit; color: var(--paper); background: #0b151f; border: 1px solid #716653; border-radius: .25rem; }
.field-help { color: var(--muted); font-size: .83rem; margin-bottom: .8rem; }
button, .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  min-height: 2.75rem;
  border: 1px solid var(--gold);
  border-radius: .3rem;
  padding: .56rem 1.05rem;
  font: 600 1rem/1.3 "Source Sans 3", "Segoe UI", sans-serif;
  text-decoration: none;
  color: #1b1a19;
  background: var(--gold);
  cursor: pointer;
}
button:hover, .button:hover { background: #f2d1a2; }
button:disabled { background: #3b454d; border-color: #65727d; color: #ced7df; cursor: wait; }
.secondary { background: transparent; color: var(--paper); border-color: #877255; }
.secondary:hover { background: #283847; }
.feedback { overflow-wrap: anywhere; margin: .65rem 0 0; color: var(--muted); }
.feedback[data-state="success"] { color: #abddbb; }
.feedback[data-state="error"] { color: #ffc68f; }
.download-status { padding: .8rem 1rem; border-left: 2px solid #8f7755; background: #0e1922; }
details { margin-top: .85rem; color: var(--muted); }
summary { cursor: pointer; width: fit-content; }
code { display: block; overflow-wrap: anywhere; margin-top: .45rem; font: .85rem/1.55 ui-monospace, monospace; }
footer { border-top: 1px solid var(--line); padding-block: 1.25rem; color: var(--muted); font-size: .88rem; }

@media (max-width: 42rem) {
  .layout { width: min(100% - 1.5rem, 70rem); }
  .header-content, nav { gap: .75rem; }
  nav { font-size: .9rem; }
  .brand img { width: 34px; height: 34px; }
  .access { grid-template-columns: 1fr; }
  .hero { background-position: center, center, 66% center; }
  main { padding-block: 1rem 2rem; }
}

@media (max-width: 24rem) {
  .header-content { align-items: flex-start; flex-direction: column; padding-block: .65rem; gap: .35rem; }
}
