@font-face {
  font-family: "Cormorant Garamond";
  src: url("fontes/cormorant-garamond-500-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Nunito Sans";
  src: url("fontes/nunito-sans-600.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  --creme: #E8D8B8;
  --vinho: #5E2A25;
  --largura: min(100vw, 520px);
  --lateral: clamp(20px, 7.2vw, 28px);
  --sobreposicao: 118px;
  --rostos: calc(var(--largura) * .58);
  --logo: 224px;
  --altura-botao: 58px;
  --espaco-botao: 14px;
  --estampa: 84px;
  --celula: calc(var(--estampa) / 4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--vinho); -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--vinho);
  color: var(--creme);
  font-family: "Nunito Sans", "Avenir Next", Avenir, sans-serif;
}

.palco {
  flex: 1;
  width: var(--largura);
  display: flex;
  flex-direction: column;
}

.foto {
  flex: 1 1 auto;
  min-height: calc(var(--rostos) + var(--sobreposicao));
  max-height: calc(var(--largura) * 1.7);
  margin-bottom: calc(var(--sobreposicao) * -1);
  background:
    linear-gradient(to bottom,
      rgb(94 42 37 / .4) 0,
      rgb(94 42 37 / .5) calc(100% - var(--sobreposicao) * 1.5),
      rgb(94 42 37 / .94) calc(100% - var(--sobreposicao) * .55),
      var(--vinho) 100%),
    url("foto.webp") 50% 0 / 165% auto no-repeat;
}

main {
  position: relative;
  padding: 0 var(--lateral);
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 { line-height: 0; }

h1 img { width: var(--logo); height: auto; display: block; }

.frase {
  margin-top: 18px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  text-align: center;
}

.links {
  width: 100%;
  max-width: 380px;
  margin-top: 28px;
  display: grid;
  gap: var(--espaco-botao);
  list-style: none;
}

.links a {
  min-height: var(--altura-botao);
  padding: 8px 16px;
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  column-gap: 10px;
  border: 1px solid var(--creme);
  border-radius: 14px;
  color: var(--creme);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: .15em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .18s ease, color .18s ease;
}

.links a span { margin-right: -.15em; }

.links a.principal { background: var(--creme); color: var(--vinho); }

@media (hover: hover) {
  .links a:hover { background: var(--creme); color: var(--vinho); }
}

.links a:active { opacity: .86; }

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

.links svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.estampa {
  flex: none;
  width: 100%;
  height: calc(var(--estampa) + env(safe-area-inset-bottom, 0px));
  margin-top: 28px;
  position: relative;
  overflow: hidden;
}

.estampa::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("estampa.svg") left top / auto calc(var(--estampa) * 2) repeat-x;
  opacity: .4;
}

@media (max-width: 359px) {
  .links a { letter-spacing: .1em; }
  .links a span { margin-right: -.1em; }
}

@media (max-height: 740px) {
  :root {
    --logo: 196px;
    --altura-botao: 52px;
    --espaco-botao: 12px;
    --estampa: 56px;
  }

  .frase { margin-top: 14px; font-size: 22px; }
  .links { margin-top: 22px; }
  .estampa { margin-top: 22px; }
}

@media (min-width: 521px) and (orientation: portrait) {
  :root {
    --largura: 100vw;
    --rostos: calc(var(--largura) * .42);
  }

  .foto {
    max-height: calc(var(--largura) * 1.3);
    background-size: auto, 118% auto;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  :root {
    --logo: clamp(132px, 34vh, 170px);
    --altura-botao: 44px;
    --espaco-botao: 8px;
  }

  .palco {
    flex: 1;
    width: 100%;
    flex-direction: row;
    align-items: stretch;
  }

  .foto {
    flex: 0 0 46%;
    min-height: 0;
    max-height: none;
    margin: 0;
    background:
      linear-gradient(to right, rgb(94 42 37 / .22) 0, rgb(94 42 37 / .34) 56%, var(--vinho) 100%),
      url("foto.webp") 50% 14% / cover no-repeat;
  }

  main {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding-block: max(10px, env(safe-area-inset-top, 0px)) max(10px, env(safe-area-inset-bottom, 0px));
    padding-right: max(var(--lateral), env(safe-area-inset-right, 0px));
  }

  .frase { margin-top: 8px; font-size: 20px; }
  .links { margin-top: 12px; }
  .links a { padding: 4px 12px; grid-template-columns: 20px 1fr 20px; column-gap: 8px; font-size: 12px; letter-spacing: .1em; }
  .links a span { margin-right: -.1em; }
  .links svg { width: 20px; height: 20px; }
  .estampa { display: none; }
}

@media (orientation: landscape) and (min-width: 700px) and (min-height: 501px) {
  :root {
    --faixa: clamp(84px, 9vw, 320px);
    --celula: calc(var(--faixa) / 4);
    --logo: clamp(236px, min(24vw, 40vh), 760px);
    --altura-botao: clamp(58px, 7vh, 120px);
    --espaco-botao: clamp(14px, 1.8vh, 32px);
  }

  body {
    flex-direction: row;
    align-items: stretch;
  }

  .palco {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    flex-direction: row;
  }

  .foto {
    flex: 0 0 58%;
    min-height: 0;
    max-height: none;
    margin: 0;
    background:
      linear-gradient(to right, rgb(94 42 37 / .06) 0, rgb(94 42 37 / .14) 52%, rgb(94 42 37 / .74) 84%, var(--vinho) 100%),
      linear-gradient(to top, rgb(55 30 19 / .34), transparent 42%),
      url("foto.webp") 50% 16% / cover no-repeat;
  }

  main {
    flex: 1;
    min-width: 0;
    justify-content: center;
    padding-block: 32px;
  }

  .frase {
    margin-top: clamp(18px, 2.4vh, 28px);
    font-size: clamp(26px, 2.3vw, 72px);
  }

  .links {
    max-width: clamp(380px, 24vw, 840px);
    margin-top: clamp(28px, 4vh, 72px);
  }

  .links a { font-size: clamp(13px, .95vw, 26px); }

  .estampa {
    flex: none;
    width: var(--faixa);
    height: auto;
    margin: 0;
  }

  .estampa::before {
    background: url("estampa.svg") left top / calc(var(--faixa) * 4) auto repeat;
    opacity: 1;
  }
}

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