/* ==========================================================================
   Páginas & Pétalas
   Boutique minimalista: branco quente, preto, fio fino e muito espaço.
   Índice: 1. Variáveis  2. Base  3. Topo  4. Abertura  5. Seções e Sobre
           6. Carta (cafeteria, livraria e flores)  7. Contato  8. Rodapé
           9. Telas maiores  10. Hover e movimento
   ========================================================================== */

/* 1. Variáveis ------------------------------------------------------------ */
:root {
  /* Cores: troque aqui para mudar a página inteira */
  --bg: #FAFAF8;          /* fundo */
  --surface: #F1F0EC;     /* fundo de foto antes de carregar */
  --text: #111111;        /* texto e botão */
  --muted: #5C5C5C;       /* texto secundário */
  --hairline: #DEDDD8;    /* fio fino */
  --text-hover: #2A2A2A;  /* botão escuro no hover */

  /* Faixa escura do contato e do rodapé */
  --inv-bg: #111111;
  --inv-text: #FAFAF8;
  --inv-muted: #A8A8A3;
  --inv-hairline: #3A3A3E;
  --inv-hover: #E4E3DE;   /* botão claro no hover */

  /* Fontes: a primeira está em fonts/ (declarada no @font-face acima), as seguintes são reserva do sistema */
  --f-display: "Libre Caslon Display", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-texto: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  /* Escala de texto */
  --fs-label: 0.75rem;
  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.4vw, 3.5rem);
  --fs-display: clamp(3.25rem, 1.5rem + 7vw, 8rem);

  /* Espaço (base 4px) */
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --section-y: clamp(64px, 6vw + 32px, 192px);
  --gutter: clamp(16px, 4vw, 48px);
  --col-gap: 24px;

  /* Movimento */
  --dur-fast: 160ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);

  --focus: var(--text);
}

/* Fontes da página, hospedadas em fonts/. Só o subconjunto latino, que cobre o português. */
@font-face {
  font-family: "Libre Caslon Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/libre-caslon-display-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("fonts/hanken-grotesk-latin.woff2") format("woff2");
}

/* 2. Base ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: var(--sp-4);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-texto);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.6;
}

h1,
h2,
h3,
p,
ul,
address {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

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

.container {
  width: min(100% - 2 * var(--gutter), 1320px);
  margin-inline: auto;
}

/* Texto só para leitor de tela */
.so-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Link "Pular para o conteúdo": aparece ao receber foco pelo teclado */
.pular {
  position: absolute;
  left: var(--sp-4);
  top: var(--sp-4);
  z-index: 10;
  padding: var(--sp-3) var(--sp-4);
  background: var(--text);
  color: var(--bg);
  transform: translateY(-300%);
}

.pular:focus {
  transform: none;
}

/* Fotos: sempre retas, sem moldura e sem sombra */
.foto {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  background: var(--surface);
}

/* Botão principal */
.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--sp-3) 28px;
  /* Borda transparente: some no tema normal e vira contorno no alto contraste do Windows */
  border: 1px solid transparent;
  background: var(--text);
  color: var(--bg);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.botao:active {
  background: #000000;
}

.botao-claro {
  background: var(--inv-text);
  color: var(--text);
}

.botao-claro:active {
  background: #FFFFFF;
}

/* Link secundário */
.link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
}

/* Títulos de seção */
.titulo {
  max-width: 14ch;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* 3. Topo ------------------------------------------------------------------ */
.topo {
  border-bottom: 1px solid var(--hairline);
}

.topo-linha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--sp-6);
  min-height: 72px;
  padding-block: var(--sp-2);
}

.marca {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--f-display);
  font-size: 1.5rem;
  line-height: 1.2;
  text-decoration: none;
}

/* Cinco links: de 320px para cima cabem em uma linha. Abaixo disso o último quebra, sem rolagem lateral. */
.nav-lista {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 8px;
  width: 100%;
}

.nav-lista a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

@media (min-width: 30rem) {
  .nav-lista {
    justify-content: flex-start;
    gap: 0 clamp(16px, 3vw, 32px);
    width: auto;
  }

  .nav-lista a {
    font-size: var(--fs-label);
    letter-spacing: 0.1em;
  }
}

/* 4. Abertura -------------------------------------------------------------- */
.abertura {
  display: grid;
  gap: var(--sp-7);
  padding-top: clamp(32px, 5vw, 72px);
}

.display {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 30ch;
  margin-top: var(--sp-5);
  font-size: var(--fs-lead);
  line-height: 1.45;
}

.acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-6);
  margin-top: var(--sp-6);
}

.abertura-info {
  max-width: 36ch;
  margin-top: var(--sp-5);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

.abertura-midia {
  margin: 0;
}

/* A foto e o vídeo da abertura são recortados em 6:5. A largura máxima segue a altura máxima,
   para a caixa nunca ficar mais larga que 6:5 e cortar a cena em cima e embaixo. */
.abertura-foto {
  aspect-ratio: 4 / 5;
  max-height: 72svh;
  max-width: calc(72svh * 6 / 5);
}

/* 5. Seções e Sobre -------------------------------------------------------- */
.secao {
  padding-top: var(--section-y);
}

.sobre {
  display: grid;
  gap: var(--sp-6);
}

.manifesto {
  font-family: var(--f-display);
  font-size: var(--fs-h3);
  line-height: 1.3;
}

.sobre-texto p + p {
  max-width: 62ch;
  margin-top: var(--sp-5);
  color: var(--muted);
}

.vista {
  margin-top: clamp(48px, 5vw, 96px);
}

.vista-foto {
  aspect-ratio: 16 / 9;
}

/* 6. Carta (cafeteria, livraria e flores) --------------------------------------------- */
.carta {
  display: grid;
  gap: var(--sp-6);
}

.nota {
  margin-top: var(--sp-4);
  color: var(--muted);
}

.lista {
  border-top: 1px solid var(--text);
}

.item {
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--hairline);
}

.item-topo {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-5);
}

.item-nome {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: var(--fs-h3);
  line-height: 1.3;
  text-wrap: balance;
}

.item-preco {
  flex: none;
  font-size: 1rem;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
}

.item-desc {
  max-width: 44ch;
  margin-top: var(--sp-2);
  color: var(--muted);
  font-size: 1rem;
}

.carta-foto {
  aspect-ratio: 1 / 1;
  margin-top: var(--sp-4);
}

/* 6b. Galeria --------------------------------------------------------------- */
.galeria-grade {
  display: grid;
  gap: var(--sp-7) var(--col-gap);
  margin-top: var(--sp-7);
}

.galeria-item {
  margin: 0;
}

.galeria-item .foto {
  aspect-ratio: 3 / 2;
}

.galeria-item figcaption {
  max-width: 44ch;
  margin-top: var(--sp-3);
  color: var(--muted);
  font-size: var(--fs-small);
  line-height: 1.5;
}

/* 7. Contato ---------------------------------------------------------------- */
.contato {
  --focus: var(--inv-text);
  margin-top: var(--section-y);
  padding-block: var(--section-y) var(--sp-9);
  background: var(--inv-bg);
  color: var(--inv-text);
}

.contato ::selection,
.rodape ::selection {
  background: var(--inv-text);
  color: var(--inv-bg);
}

.contato-grade {
  display: grid;
  gap: var(--sp-7);
}

.aviso {
  max-width: 46ch;
  margin-top: var(--sp-5);
  color: var(--inv-muted);
}

.aviso strong {
  color: var(--inv-text);
  font-weight: 500;
}

.contato-bloco {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--inv-hairline);
}

.rotulo {
  margin-bottom: var(--sp-4);
  color: var(--inv-muted);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

.horarios li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 var(--sp-5);
  max-width: 22rem;
  font-variant-numeric: tabular-nums lining-nums;
}

.horarios li + li {
  margin-top: var(--sp-2);
}

.fone {
  font-family: var(--f-display);
  font-size: var(--fs-h3);
  line-height: 1.2;
  white-space: nowrap;
}

.fone a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.email a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  overflow-wrap: anywhere;
}

.bloco-nota {
  margin-top: 4px;
  color: var(--inv-muted);
  font-size: var(--fs-small);
}

.contato-bloco .botao {
  margin-top: var(--sp-4);
}

/* 8. Rodapé ----------------------------------------------------------------- */
.rodape {
  --focus: var(--inv-text);
  padding-bottom: var(--sp-6);
  background: var(--inv-bg);
  color: var(--inv-muted);
  font-size: var(--fs-small);
}

.rodape-linha {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--inv-hairline);
}

.rodape-marca {
  color: var(--inv-text);
  font-family: var(--f-display);
  font-size: 1.25rem;
  line-height: 1.2;
}

.rodape a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--inv-text);
}

/* 9. Telas maiores ---------------------------------------------------------- */
@media (min-width: 40rem) {
  .galeria-grade {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contato-grade {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }

  .contato-cabeca {
    grid-column: 1 / -1;
  }
}

@media (min-width: 60rem) {
  .abertura,
  .sobre,
  .carta {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
  }

  /* Abertura: texto embaixo à esquerda, foto alta à direita */
  .abertura {
    row-gap: 0;
    align-items: end;
  }

  .abertura-texto {
    grid-column: 1 / span 5;
    padding-bottom: var(--sp-6);
  }

  .abertura-midia {
    grid-column: 7 / -1;
  }

  .abertura-foto {
    max-height: min(78svh, 820px);
    max-width: calc(min(78svh, 820px) * 6 / 5);
  }

  /* Sobre: título à esquerda, texto à direita */
  .sobre .titulo {
    grid-column: 1 / span 4;
  }

  .sobre-texto {
    grid-column: 6 / span 6;
  }

  /* Carta: título e foto de um lado, lista do outro */
  .carta {
    grid-template-rows: auto 1fr;
    row-gap: var(--sp-7);
  }

  .carta-cabeca {
    grid-column: 1 / span 5;
    grid-row: 1;
  }

  .carta-foto {
    grid-column: 1 / span 5;
    grid-row: 2;
    align-self: start;
    margin-top: 0;
  }

  .lista {
    grid-column: 7 / -1;
    grid-row: 1 / span 2;
    align-self: start;
  }

  /* Carta invertida (hoje a Livraria): lados trocados */
  .carta-invertida .carta-cabeca,
  .carta-invertida .carta-foto {
    grid-column: 8 / -1;
  }

  .carta-invertida .lista {
    grid-column: 1 / span 6;
  }
}

/* 10. Hover e movimento -----------------------------------------------------
   Hover só em aparelho com mouse. Movimento só para quem não pediu redução. */
@media (hover: hover) {
  .botao:hover {
    background: var(--text-hover);
  }

  .botao-claro:hover {
    background: var(--inv-hover);
  }

  .nav-lista a:hover,
  .marca:hover {
    text-decoration: underline;
  }

  .fone a:hover {
    text-decoration: underline;
  }

  .link:hover,
  .email a:hover,
  .rodape a:hover {
    text-decoration-thickness: 2px;
  }
}

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

@media (prefers-reduced-motion: reduce) {
  .botao {
    transition: none;
  }
}
