/* Golden Hour — sistema visual.
   A paleta vem do assunto: a luz ao longo do dia. Âmbar de madrugada (--sun),
   índigo de fim de noite (--dusk), verde-cinza de sombra (--moss). O chão é
   osso quente, para o mapa (que é quase só linha) poder respirar. */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/Fraunces.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/Archivo.woff2') format('woff2');
  font-weight: 400 600;
  font-display: swap;
  font-style: normal;
}

:root {
  --paper: #F1EEE8;
  --surface: #FAF8F4;
  --sunken: #E7E2D8;
  --ink: #191510;
  --muted: #7C7469;
  --rule: #DDD6CA;
  --street: #D3CCBF;
  --street-strong: #BEB5A4;
  --sun: #C0561B;
  --sun-soft: #F0E1D2;
  --dusk: #3A4A7C;
  --moss: #5A7150;

  --serif: 'Fraunces', 'Iowan Old Style', Palatino, Georgia, serif;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, monospace;

  --w: min(1160px, 100% - 2.5rem);
  --col: min(66ch, 100% - 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #141210;
    --surface: #1C1915;
    --sunken: #100E0C;
    --ink: #ECE6DC;
    --muted: #968D80;
    --rule: #2F2921;
    --street: #342E26;
    --street-strong: #4A4234;
    --sun: #E8934E;
    --sun-soft: #2B2018;
    --dusk: #93A3DE;
    --moss: #93AD87;
  }
}
:root[data-theme='dark'] {
  --paper: #141210;
  --surface: #1C1915;
  --sunken: #100E0C;
  --ink: #ECE6DC;
  --muted: #968D80;
  --rule: #2F2921;
  --street: #342E26;
  --street-strong: #4A4234;
  --sun: #E8934E;
  --sun-soft: #2B2018;
  --dusk: #93A3DE;
  --moss: #93AD87;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  font-synthesis-weight: none;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.018em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.4rem, 7.2vw, 4.6rem); line-height: 0.98;
     font-variation-settings: 'opsz' 100, 'SOFT' 0; }
h2 { font-size: clamp(1.55rem, 3.6vw, 2.3rem); line-height: 1.12;
     font-variation-settings: 'opsz' 40; }
h3 { font-size: 1.1rem; line-height: 1.3; font-variation-settings: 'opsz' 20; }
p { margin: 0 0 1.05em; }
a { color: var(--sun); text-underline-offset: 3px; }
strong { font-weight: 600; }

.wrap { width: var(--w); margin-inline: auto; }
.col { width: var(--col); margin-inline: auto; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.lead {
  font-family: var(--serif);
  font-size: clamp(1.14rem, 2.1vw, 1.38rem);
  line-height: 1.48;
  font-variation-settings: 'opsz' 20;
  color: var(--ink);
}

/* ---------------- controlos ---------------- */
.btn {
  font-family: var(--sans);
  font-size: 0.97rem;
  font-weight: 600;
  border-radius: 2px;
  padding: 0.82em 1.6em;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn--sun { background: var(--sun); color: var(--paper); }
.btn--sun:hover { background: var(--ink); }
.btn--sun:disabled { opacity: 0.4; cursor: default; background: var(--sun); }
.btn--ghost { background: none; border-color: var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--sun); color: var(--sun); }

.themebtn {
  background: none; border: 1px solid var(--rule); color: var(--muted);
  border-radius: 999px; width: 2.15rem; height: 2.15rem; display: grid; place-items: center;
  cursor: pointer; padding: 0; flex: 0 0 auto; transition: color .15s, border-color .15s;
}
.themebtn:hover { color: var(--sun); border-color: var(--sun); }
.themebtn svg { display: block; }

:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
